package xyx.ysfwpt.service;

import org.apache.ibatis.annotations.Param;
import xyx.ysfwpt.model.User;

import java.util.List;

public interface UserService {

    User selectUserByName(String username);

    List<User> selectAllUser();

    User selectUserByJobNumber(int job_number);

    List<User> selectUserByDirector(int director);

    List<User> selectUserByInputList(@Param(value = "department") String department,
                                     @Param(value = "clinical_title") String clinical_title,
                                     @Param(value = "teaching_title") String teaching_title,
                                     @Param(value = "type") String type,
                                     @Param(value = "source") String source,
                                     @Param(value = "state") Integer state,
                                     @Param(value = "searchword") String searchword,
                                     @Param(value = "job_number") Integer job_number,
                                     @Param(value = "user_type") String user_type,
                                     @Param(value = "timefrom") String timefrom,
                                     @Param(value = "timeto") String timeto,
                                     @Param(value = "searchtype") Integer searchtype);

    void addUser(User user);

    void updateUser(User user);

    void updateUser2(User user);

    void updateUserPhoto(int job_number,String imgurl);

    void updateUserPSW(int job_number,String password);

    void updateDepartment(@Param(value = "job_number") int job_number, @Param(value = "department") String department, @Param(value = "director") int director);

    void updateState(@Param(value = "job_number") int job_number, @Param(value = "state") Integer state);

    void updateIslock(@Param(value = "job_number") int job_number, @Param(value = "islock") Integer islock);

    void deleteUser(int job_number);

    List<User> selectIsLock2(@Param(value = "islock2") Integer islock2);

    void updateIsLock2(@Param(value = "job_number") int job_number,
                       @Param(value = "islock2") Integer islock2,
                       @Param(value = "locktime") String locktime);

}
